package com.sky.service.user;

import com.sky.dto.*;
import com.sky.pojo.Courier;
import com.sky.result.PageResult;
import com.sky.result.Result;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

public interface OrderService {
    Result<String> getEstimatedDeliveryTime(Long shopId, String customerAddress);

    Result<OrderSubmitVO> submit(OrdersSubmitDTO dto);

    Result<OrderPaymentVO> payment(OrdersPaymentDTO dto);

    /**
     * 用户端订单分页查询
     * @param page
     * @param pageSize
     * @param status
     * @return
     */
    PageResult pageQuery4User(int page, int pageSize, Integer status);

    /**
     * 查询订单详情
     * @param id
     * @return
     */
    OrderVO details(Long id);

    /**
     * 再来一单
     *
     * @param id
     */
    void repetition(Long id);

    /**
     * 用户取消订单
     * @param id
     */
    void userCancelById(Long id) throws Exception;

    Result<PageResult> conditionSearch(OrdersPageQueryDTO dto);

    Result<OrderStatisticsVO> statistics();

    Result<OrderVO> adminOrderDetails(Long orderId);

    Result<String> adminCancelOrder(OrdersCancelDTO dto);

    Result<Courier> confirm(OrdersConfirmDTO dto);


}
